import { $get } from '@js/request'

export interface DataSchema {
  orderno: number
  accepter_case_score: number
  accepter_case_weights: number
  accountid: string
  create_datetime: number
  employee_type: string
  id: string
  name: string
  operator: string
  operatorid: string
  performanceid: string
  processer_case_score: number
  processer_case_weights: number
  score: number
  status: string
  work_score: number
  work_weights: number
  accepter_case_coefficient: number
  accepter_advise_count: number
  dismissal_count: number
  score_withratio: number
  processer_ratio_score: number
  accepter_ratio_score: number
}

// 获取列表
export async function getListRequest (performanceid: string): Promise<DataSchema[]> {
  const res = await $get('/api/commission/performance_score', { performanceid })
  return res.data
}

// 刷新列表
export async function refreshListRequest (performanceid: string): Promise<DataSchema[]> {
  const res = await $get('/api/commission/performance_score/refresh_score', { performanceid })
  return res.data
}
